package com.zhuiyun.project.api.trainingRecord.mapper;


import com.zhuiyun.project.api.trainingRecord.entity.TrainingRecord;
import com.zhuiyun.project.api.trainingRecord.model.CalculateExpend;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @ClassName reservationMapper
 * @Description TODO 用户训练记录表持久层接口
 * @Author wx
 * @Date 2023/11/14 13:28
 **/
@Mapper
public interface TrainingRecordMapper {

    /**
    * @Author wx
    * @Description 添加会员记录信息
    * @Date 2023/11/21 8:42
    * @Return
    * @param trainingRecord
    */
    Integer saveTrainingRecord(TrainingRecord trainingRecord);


    /**
     * @Author wx
     * @Description 查询会员体重记录
     * @Date 2023/11/21 8:42
     * @Return
     * @param venueUniqueIdentifier
     */
    TrainingRecord getStudentTrainingWeight(Integer id, String venueUniqueIdentifier);

    /**
     * @Author wx
     * @Description 获取会员用户所有体重记录
     * @Date 2023/11/21 9:22
     * @Return
     * @param venueUniqueIdentifier
     */
    List<TrainingRecord> getStudentTrainingAllWeight(Integer id, String venueUniqueIdentifier);


    /**
     * @Author wx
     * @Description 获取会员用户前天最近一次体重记录
     * @Date 2023/11/21 8:55
     * @Return
     * @param venueUniqueIdentifier
     */
    TrainingRecord getStudentTrainingLastWeight(Integer id, String venueUniqueIdentifier);

    /**
    * @Author wx
    * @Description 根据年月查询月末体重
    * @Date 2023/11/21 14:46
    * @Return
    * @param year
    */
    TrainingRecord getStudentTrainingMinWeight(int month, int year, Integer id);

    /**
     * @Author wx
     * @Description 根据年月查询月初体重
     * @Date 2023/11/21 14:46
     * @Return
     * @param year
     */
    TrainingRecord getStudentTrainingMaxWeight(int month, int year, Integer id);

    CalculateExpend selectExpend(Integer id);

    /**
     * @Author wx
     * @Description 查询今日训练消耗
     * @Date 2023/11/28 9:10
     * @Return
     * @param venueUniqueIdentifier
     */
    List<TrainingRecord> getStudentNowkcal(Integer id, String venueUniqueIdentifier);
}
